<template>
  <div>
    <el-aside>
      <el-menu
        default-active="2"
        class="el-menu-vertical-demo"
        @open="handleOpen"
        @close="handleClose"
        :router="true"
      >
        <el-sub-menu index="1">
          <template #title>
            <span>办公管理</span>
          </template>
          <el-menu-item index="/home/renwu">任务管理</el-menu-item>
        </el-sub-menu>
      </el-menu></el-aside
    >
    <el-main>
      <RouterView />
    </el-main>
  </div>
</template>
  
  <script lang="ts" setup>
import {
  Document,
  Menu as IconMenu,
  Location,
  Setting,
} from "@element-plus/icons-vue";
import { RouterLink, RouterView } from "vue-router";

const handleOpen = (key: string, keyPath: string[]) => {
  console.log(key, keyPath);
};
const handleClose = (key: string, keyPath: string[]) => {
  console.log(key, keyPath);
};
</script>
<style scoped>
* {
  margin: 0;
  padding: 0;
}
.el-aside {
    width: 150px;
  height: 98vh;
  float: left;
}
.el-menu {
  height: 98vh;
}
</style>